package com.tfswue.lhj.controller;
import com.tfswue.lhj.entity.User;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class YmlController {
//    @Autowired
//    private User user;

//    @RequestMapping("/yml")
//    public String yml() {
//        return user.toString();
//    }

//    @GetMapping("/yml/addresses")
//    public List<String> getUserAddresses() {
//        return user.getAddresses();
//    }

    @RequestMapping("/session")
    public String session(HttpSession session) {
        session.setAttribute("username", "aaa");

        System.out.println(session.getAttribute("username"));
        return "success end";
    }
}